package org.car.world.service.impl;

import java.util.List;

import org.car.world.core.entily.AdminTable;
import org.car.world.core.mapper.AdminTableMapper;
import org.car.world.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
public class AdminServiceImpl implements AdminService {

    @Autowired
    AdminTableMapper adminTableMapper;

    @Override
    public int deleteByPrimaryKey(Integer adminId) {
        return adminTableMapper.deleteByPrimaryKey(adminId);
    }

    @Override
    public int insert(AdminTable record) {
        return adminTableMapper.insert(record);
    }

    @Override
    public AdminTable selectByPrimaryKey(Integer adminId) {
        return adminTableMapper.selectByPrimaryKey(adminId);
    }

    @Override
    public List<AdminTable> selectAll() {
        return adminTableMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(AdminTable record) {
        return adminTableMapper.updateByPrimaryKey(record);
    }

    @Override
    public AdminTable login(AdminTable record) {
        return adminTableMapper.login(record);
    }

}
